package com.sunwayworld.basemodule.coredata.test.resource;

import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.restful.data.RestValidationResultBean;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sunwayworld.basemodule.coredata.test.bean.LimsTestBean;
import com.sunwayworld.basemodule.coredata.test.service.LimsTestService;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import com.sunwayworld.framework.support.choosable.resource.GenericChoosableResource;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/coredata/tests")
public interface LimsTestResource extends GenericResource<LimsTestService, LimsTestBean, Long>, GenericChoosableResource<LimsTestService, LimsTestBean, Long> {

    @RequestMapping(value = {"/action/validate-formul"},method = RequestMethod.POST)
    RestValidationResultBean validateFormul(RestJsonWrapperBean wrapper); // 脚本验证，防止脚本注入

    @RequestMapping(value = "/items/action/test-script", method = RequestMethod.POST)
    String testItemScript(RestJsonWrapperBean wrapper); // 脚本测试
}
